﻿@model IQueryable<YTCMS.Domain.Entities.ads>
@using YTCMS.Core;
<table id="sample-table-1" class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th class="center">
                <label>
                    <input type="checkbox" class="ace" />
                    <span class="lbl"></span>
                </label>
            </th>
            <th>标题</th>
            <th>Code</th>
            <th>创建时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @{
            if (Model.Any())
            {
                foreach (var item in Model)
                {
                    <tr>
                        <td class="center">
                            <label>
                                <input type="checkbox" class="ace" />
                                <span class="lbl"></span>
                            </label>
                        </td>

                        <td>@item.Title</td>
                        <td>@item.Code</td>
                        <td>@item.CreateTime</td>
                        <td>@Html.Raw(Enum.GetName(typeof(YTCMS.Core.CommonState), item.State).AdminStateExtend())</td>
                        <td>
                            <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                
                                <a class="green" href="/ads/edit?id=@item.Id" title="修改基本信息">
                                    修改
                                </a>

                                <a class="btn btn-xs btn-danger" href="javascript:void(0)" onclick="WZTDelete('/ads/Delete', {id:@item.Id})">
                                    <i class="icon-trash bigger-120"></i>删除
                                </a>
                            </div>
                        </td>
                    </tr>
                }
            }

        }
    </tbody>
</table>
@Html.AjaxPager((int)ViewBag.PageSize, (int)ViewBag.TotalCount)
